home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_01_01 / 1n01017a < prev    next >
Text File  |  1990-09-25  |  517b  |  20 lines

  1.  
  2.   long FAR PASCAL WndProc(HWND hWnd,unsigned message,WORD wParam,LONG lParam)
  3.    {
  4.    switch (message) {
  5.       case WM_CREATE:
  6.            SetWindowText(hWnd, "Demo Application");
  7.            break;
  8.       case WM_COMMAND:
  9.            if (wParam == IDM_EXIT)
  10.               SendMessage(hWnd, WM_DESTROY, 0, 0L);
  11.            break;
  12.       case WM_DESTROY:
  13.            PostQuitMessage(0);
  14.            break;
  15.       default:return(DefWindowProc(hWnd, message, wParam, lParam));
  16.       }
  17.    return(NULL);
  18.    }
  19.  
  20.